package com.xuelang.pipeline.artifact.app.harborv2.request;

import com.fasterxml.jackson.annotation.JsonProperty;
import com.xuelang.pipeline.artifact.app.harborv2.xo.WebhookTargetObject;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.time.OffsetDateTime;
import java.util.List;

/**
 * @author xiwen.zxg
 * @since 2024/7/18
 */
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
public class CreateWebhookPolicyRequest {
    /**
     * The create time of the webhook policy.
     */
    @JsonProperty("creation_time")
    private OffsetDateTime creationTime;
    /**
     * The creator of the webhook policy.
     */
    private String creator;
    /**
     * The description of webhook policy.
     */
    private String description;
    /**
     * Whether the webhook policy is enabled or not.
     */
    private Boolean enabled;
    /**
     * The event types of webhook policy.
     */
    @JsonProperty("event_types")
    private List<String> eventTypes;
    /**
     * The webhook policy ID.
     */
    private Long id;
    /**
     * The name of webhook policy.
     */
    private String name;
    /**
     * The project ID of webhook policy.
     */
    @JsonProperty("project_id")
    private Long projectId;
    /**
     * The targets of webhook policy.
     */
    private List<WebhookTargetObject> targets;
    /**
     * The update time of the webhook policy.
     */
    @JsonProperty("update_time")
    private OffsetDateTime updateTime;
}
